<!DOCTYPE html>
<html>
<head>
    

    

    



    <meta charset="utf-8">
    
    
    
    
    <title>移动端页面开发关键—尺寸和布局 | Anson&#39;s Blog | 种一棵树最好的时间在十年前，其次是现在。</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="JavaScript,CSS">
    <meta name="description" content="尺寸在移动端页面，我用到的尺寸单位有em、rem、vw、px基本不用，但我会设置Dom根元素html字体大小为14px，一来方便em和rem的尺寸计算，二来14px是最常用的字体大小。  常规浏览器默认字体大小为16px，最小字体为12px。  em首先你要有这样一个基础的认知：  假如一个元素没有重设字体大小，那么它的字体大小会继承父级元素，如果父级也没有设置大小，那么依次类推一直追溯到body">
<meta name="keywords" content="JavaScript,CSS">
<meta property="og:type" content="article">
<meta property="og:title" content="移动端页面开发关键—尺寸和布局">
<meta property="og:url" content="http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/index.html">
<meta property="og:site_name" content="Anson&#39;s Blog">
<meta property="og:description" content="尺寸在移动端页面，我用到的尺寸单位有em、rem、vw、px基本不用，但我会设置Dom根元素html字体大小为14px，一来方便em和rem的尺寸计算，二来14px是最常用的字体大小。  常规浏览器默认字体大小为16px，最小字体为12px。  em首先你要有这样一个基础的认知：  假如一个元素没有重设字体大小，那么它的字体大小会继承父级元素，如果父级也没有设置大小，那么依次类推一直追溯到body">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2018-10-19T09:59:50.993Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="移动端页面开发关键—尺寸和布局">
<meta name="twitter:description" content="尺寸在移动端页面，我用到的尺寸单位有em、rem、vw、px基本不用，但我会设置Dom根元素html字体大小为14px，一来方便em和rem的尺寸计算，二来14px是最常用的字体大小。  常规浏览器默认字体大小为16px，最小字体为12px。  em首先你要有这样一个基础的认知：  假如一个元素没有重设字体大小，那么它的字体大小会继承父级元素，如果父级也没有设置大小，那么依次类推一直追溯到body">
    
        <link rel="alternate" type="application/atom+xml" title="Anson&#39;s Blog" href="/atom.xml">
    
    <link rel="shortcut icon" href="/img/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="https://yscoder.github.io/img/face.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">张宁乐</h5>
          <a href="mailto:zhangningle2017@gmail.com" title="zhangningle2017@gmail.com" class="mail">zhangningle2017@gmail.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/about"  >
                <i class="icon icon-lg icon-user"></i>
                关于
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/ansonznl" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">移动端页面开发关键—尺寸和布局</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">移动端页面开发关键—尺寸和布局</h1>
        <h5 class="subtitle">
            
                <time datetime="2017-12-29T11:06:01.000Z" itemprop="datePublished" class="page-time">
  2017-12-29
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#尺寸"><span class="post-toc-number">1.</span> <span class="post-toc-text">尺寸</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#em"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">em</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#rem"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">rem</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#vw"><span class="post-toc-number">1.3.</span> <span class="post-toc-text">vw</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#布局"><span class="post-toc-number">2.</span> <span class="post-toc-text">布局</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#flex-wrap"><span class="post-toc-number">2.1.</span> <span class="post-toc-text">flex-wrap</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#flex-direction"><span class="post-toc-number">2.2.</span> <span class="post-toc-text">flex-direction</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#justify-content"><span class="post-toc-number">2.3.</span> <span class="post-toc-text">justify-content</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#align-items"><span class="post-toc-number">2.4.</span> <span class="post-toc-text">align-items</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#align-content"><span class="post-toc-number">2.5.</span> <span class="post-toc-text">align-content</span></a></li></ol></li></ol>
        </nav>
    </aside>


<article id="post-移动端页面开发关键—尺寸和布局"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">移动端页面开发关键—尺寸和布局</h1>
        <div class="post-meta">
            <time class="post-time" title="2017-12-29 19:06:01" datetime="2017-12-29T11:06:01.000Z"  itemprop="datePublished">
2017-12-29
<!--2018-10-19 17:59:50-->
</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h2 id="尺寸"><a href="#尺寸" class="headerlink" title="尺寸"></a>尺寸</h2><p>在移动端页面，我用到的尺寸单位有<code>em</code>、<code>rem</code>、<code>vw</code>、<code>px</code>基本不用，但我会设置Dom根元素<code>html</code>字体大小为<code>14px</code>，一来方便<code>em</code>和<code>rem</code>的尺寸计算，二来<code>14px</code>是最常用的字体大小。</p>
<blockquote>
<p>常规浏览器默认字体大小为<code>16px</code>，最小字体为<code>12px</code>。</p>
</blockquote>
<h3 id="em"><a href="#em" class="headerlink" title="em"></a>em</h3><p>首先你要有这样一个基础的认知：</p>
<blockquote>
<p>假如一个元素没有重设字体大小，那么它的字体大小会继承父级元素，如果父级也没有设置大小，那么依次类推一直追溯到body、html。</p>
</blockquote>
<p><code>em</code>是相对于当前元素字体大小计算像素值的，计算方法是<code>em</code>值 * 字体大小。</p>
<p>举例：<br>一个元素设置了高度为<code>2em</code>，那么实际像素值为<code>2 * 14px = 28px</code>，而一旦这个元素重设了字体大小为<code>2em</code>，那么该元素高度值为<code>2 * 28px = 56px</code>。另外，其后的子元素的计算基数都会改变。</p>
<p>使用em时一旦有设置字体大小的样式出现就需要注意重新计算一些属性值大小了。</p>
<h3 id="rem"><a href="#rem" class="headerlink" title="rem"></a>rem</h3><p>与 <code>em</code> 相比，这货看起来多了一个字母，显然是属于升级版本。<br><code>rem</code>是始终相对与 Dom 根元素html来计算像素值的。不管当前元素字体如何设置，计算时字体大小仍然以html的字体设置为基准。</p>
<h3 id="vw"><a href="#vw" class="headerlink" title="vw"></a>vw</h3><p>vw指的的当前屏幕宽度，与之对应的还有 vh，表示屏幕高度。如果屏幕宽为 <code>360px</code>，那么 <code>100vw = 360px</code>。</p>
<p>是否感觉并没有什么卵用？别着急，下面说一下我的一次适用经历。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line">html：</span><br><span class="line"></span><br><span class="line">&lt;div class=&quot;box&quot;&gt;</span><br><span class="line">    &lt;div class=&quot;inner&quot;&gt;</span><br><span class="line">        &lt;div class=&quot;cont cont-1&quot;&gt;&lt;/div&gt;</span><br><span class="line">        &lt;div class=&quot;cont cont-2&quot;&gt;&lt;/div&gt;</span><br><span class="line">        &lt;div class=&quot;cont cont-3&quot;&gt;&lt;/div&gt;</span><br><span class="line">    &lt;/div&gt;</span><br><span class="line">&lt;div&gt;</span><br><span class="line">css：</span><br><span class="line"></span><br><span class="line">.box &#123;</span><br><span class="line">    width: 100%;</span><br><span class="line">    overflow: hidden;</span><br><span class="line">&#125;</span><br><span class="line">.inner &#123;</span><br><span class="line">    width: 300%;</span><br><span class="line">&#125;</span><br><span class="line">.cont &#123;</span><br><span class="line">    float: left;</span><br><span class="line">    width: 100%;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>以上代码用以实现三屏的左右切换效果，外层容器.box和三个内容块宽度为屏幕宽度，三个内容块设置了左浮动样式。此时，内层容器.inner需要有3倍的屏幕宽度以承载三个内容块。<br>但是由于宽度继承的关系，在内层容器.inner宽度改变后，内容块的宽度计算基数也改变了。此时设置的100%是等于父级元素宽度的，也就是三倍屏宽。</p>
<p>使用js是很容易解决这个问题的，不过<code>vw</code>显然是可以适用这个场景的。<br>只需要如下设置便可解决问题。</p>
<p><code>.cont { width: 100vw; }</code><br>该属性在兼容性为android 4.4+，谨慎使用。</p>
<p><code>devicePixelRatio</code><br>在一个图表页中，我用canvas画了个饼图。发现在手机屏幕中区块颜色显得模糊。于是搜索资料就找到了这个属性，<code>window.devicePixelRatio</code>。<br>目前我对这个属性的理解还不深，基本的理解为：屏幕缩放比。传送门：张鑫旭：<a href="https://www.zhangxinxu.com/wordpress/2012/08/window-devicepixelratio/" target="_blank" rel="noopener">设备像素比devicePixelRatio简单介绍</a></p>
<p>我们通过写的css中像素仅为逻辑像素，就是你看到的宽度，而实际上手机屏幕单个点是可能存在多个像素的。</p>
<p>如果是常规页面元素是用不到这个属性的，而canvas的真实宽度和css宽度是不一致的。<br>计算方法为：<code>canvas.width = canvas.style.width * devicePixelRatio。</code></p>
<p>需要注意：一旦重设了canvas的真实宽度，那么canvas之上的一切元素都需要乘以<code>devicePixelRatio</code>进行缩放。</p>
<h2 id="布局"><a href="#布局" class="headerlink" title="布局"></a>布局</h2><p>在PC上为了兼容可恶的IE不得不使用大量的浮动来进行块级元素的并行排行。而在移动端我们有了更好的选择，但不是<code>inline-block</code>，而是flex。</p>
<p>使用flex可以轻易的实现等宽、散列、垂直居中、多行排列、底部对齐等等各种布局。</p>
<p>定义一个flex容器<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">.flex-row &#123;</span><br><span class="line">    display: flex;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>通过设置容器属性，可以呈现不同的排列对齐方式。</p>
<h3 id="flex-wrap"><a href="#flex-wrap" class="headerlink" title="flex-wrap"></a>flex-wrap</h3><p>定义容器换行方式，默认不换行。可设置换行和反向换行。</p>
<h3 id="flex-direction"><a href="#flex-direction" class="headerlink" title="flex-direction"></a>flex-direction</h3><p>排列方向，默认子元素从左到右顺序排列。通过设置该值可以实现反向排列或垂直方向的上下排列。</p>
<h3 id="justify-content"><a href="#justify-content" class="headerlink" title="justify-content"></a>justify-content</h3><p>主轴（水平方向）对齐方式，默认左对齐。可以实现居中、右对齐、等宽间隔等排列。</p>
<h3 id="align-items"><a href="#align-items" class="headerlink" title="align-items"></a>align-items</h3><p>侧轴（垂直）对齐方式。可实现垂直居中、底部对齐、基线对齐等。</p>
<h3 id="align-content"><a href="#align-content" class="headerlink" title="align-content"></a>align-content</h3><p>多轴垂直对齐方式。</p>
<p>最后附上Demo：flex常用布局:<a href="https://imys.net/demo/flex.html" target="_blank" rel="noopener">https://imys.net/demo/flex.html</a></p>
<p>参考：</p>
<p>大漠：<a href="http://www.w3cplus.com/css3/flexbox-basics.html" target="_blank" rel="noopener">Flexbox——快速布局神器</a><br>阮一峰：<a href="http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html" target="_blank" rel="noopener">Flex 布局教程：语法篇</a><br>阮一峰：<a href="http://www.ruanyifeng.com/blog/2015/07/flex-examples.html" target="_blank" rel="noopener">Flex 布局教程：实例篇</a></p>

        </div>

        <blockquote class="post-copyright">
    
    <footer>
        <a href="http://yoursite.com">
            <img src="https://yscoder.github.io/img/face.jpg" alt="张宁乐">
            张宁乐
        </a>
    </footer>
</blockquote>

        


        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/CSS/">CSS</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JavaScript/">JavaScript</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/&title=《移动端页面开发关键—尺寸和布局》 — Anson's Blog&pic=https://yscoder.github.io/img/face.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/&title=《移动端页面开发关键—尺寸和布局》 — Anson's Blog&source=张宁乐,博客" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《移动端页面开发关键—尺寸和布局》 — Anson's Blog&url=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2018/01/06/设置账户SSH/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">添加账户SSH （免密码上传）</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2017/12/26/js判断pc端和移动端/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">js判断浏览设备</h4>
      </a>
    </div>
  
</nav>



    











    <!-- Valine Comments -->
    <div class="comments vcomment" id="comments"></div>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>
    <!-- Valine Comments script -->
    <script>
        var GUEST_INFO = ['nick','mail','link'];
        var guest_info = 'nick,mail'.split(',').filter(function(item){
          return GUEST_INFO.indexOf(item) > -1
        });
        new Valine({
            el: '#comments',
            notify: 'false' == 'true',
            verify: 'false' == 'true',
            appId: "gbSwUaucLkuxqOLxm131Mg9U-gzGzoHsz",
            appKey: "b9xU2qIPrm06S0uymbAfrGMD",
            avatar: "mm",
            placeholder: "要不要说点什么？",
            guest_info: guest_info.length == 0 ? GUEST_INFO : guest_info,
            pageSize: "10"
        })
    </script>
    <!-- Valine Comments end -->







</article>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>张宁乐 &copy; 2017 - 2019</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
			<span>
					Hosted by <a href="https://pages.coding.me" style="font-weight: bold">Coding Pages</a>
			  </span>
        </p>
    </div>
</footer>
<!-- <script>
(function(){
    var bp = document.createElement("script");
    var curProtocol = window.location.protocol.split(":")[0];
    if (curProtocol === "https") {
        bp.src = "https://zz.bdstatic.com/linksubmit/push.js";
    }
    else {
        bp.src = "http://push.zhanzhang.baidu.com/push.js";
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script> -->

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/&title=《移动端页面开发关键—尺寸和布局》 — Anson's Blog&pic=https://yscoder.github.io/img/face.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/&title=《移动端页面开发关键—尺寸和布局》 — Anson's Blog&source=张宁乐,博客" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《移动端页面开发关键—尺寸和布局》 — Anson's Blog&url=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2017/12/29/移动端页面开发关键—尺寸和布局/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
